package bigk.pluzzdl;

import android.util.Log;
import android.widget.TextView;

public class Logger {
	
	private String m_name;
	private int m_level=0;
	
	
	public static Logger getLogger(String name) {
		return new Logger(name);
	}
	
	private Logger(String name) {
		m_name = name;
	}
	
	public void setLevel(int level) {
		m_level = level;
	}
	
	public void log(int level, String msg) {
		if (level>=m_level) {
			switch (level) {
			case Level.SEVERE :
				Log.e(m_name, msg);
				break;
			case Level.WARNING :
				Log.w(m_name, msg);
				break;
			case Level.INFO :
				Log.i(m_name, msg);
				break;
			case Level.FINEST :
				Log.d(m_name, msg);
				break;
			default:
				Log.i(m_name,msg);
			}
		}
			
	}

	
	
}
